//时间戳转换
export function tiems(items) {
  let item = items
  for (let i = 0; i < item.length; i++) {
    let time = new Date(item[i].createdate);
    let y = time.getFullYear();
    let m = time.getMonth() + 1;
    let d = time.getDate();
    let h = time.getHours();
    let mm = time.getMinutes();
    let s = time.getSeconds();
    item[i].createdate = y + "-" + m + "-" + d
  }
  return item
}
export function test(arrs, id) {
  const arr = arrs;
  for (let i = 0; i < arr.length; i++) {
    if (arr[i].parentid == id) {
      return arr[i].parentid;
    }
    for (let j = 0; j < arr[i].children.length; j++) {
      if (arr[i].children[j].parentid == id) {
        return arr[i].parentid;
      }
      for (let s = 0; s < arr[i].children[j].children.length; s++) {
        if (arr[i].children[j].children[s].parentid == id) {
          return arr[i].children[j].parentid;
        }
      }
    }
  }
}

